package com.ytjj.qmyx.admin.eunm;

import lombok.Getter;

@Getter
public enum LabelTypeEnums {

    DYNAMIC("dynamic", "测评"),
    ;

    /**
     * 标签类型
     */
    private String code;

    /**
     * 标签描述
     */
    private String type;

    LabelTypeEnums(String code, String type) {
        this.code = code;
        this.type = type;
    }

    /**
     * 获取标签描述
     *
     * @param code
     * @return
     */
    public static String getTypeByCode(String code) {
        LabelTypeEnums[] values = LabelTypeEnums.values();
        for (LabelTypeEnums value : values) {
            if(value.code.equals(code)) {
                return value.getType();
            }
        }
        return null;
    }
}
